import axios from '@/utils/request'

export const searchPersonPosition = (params) => {
  return axios.get('/api/person-positions/search', { params })
}

export const addPersonPosition = (data) => {
  return axios.post('/api/person-positions', data)
}

export const updatePersonPosition = (id, data) => {
  return axios.put(`/api/person-positions/${id}`, data)
}

export const deletePersonPosition = (id) => {
  return axios.delete(`/api/person-positions/${id}`)
}

export const getAllPositions = ()  => {
  return axios.get('/api/positions' )
}